//
//  SITextField.m
//  UI02_UILabel_UITextField_UIButton_UIImageHomeworkFirst
//
//  Created by dllo on 16/6/6.
//  Copyright © 2016年 司昌宝. All rights reserved.
//

#import "SITextField.h"

@implementation SITextField

-(instancetype)initWithFrame:(CGRect)frame withText:(NSString *)text{
    self = [super initWithFrame:frame];
    if(self){
        self.placeholder = text;
        self.borderStyle = UITextBorderStyleRoundedRect;
        self.layer.masksToBounds = YES;
        self.layer.borderWidth = 1.5;
        self.layer.cornerRadius = 5;
        
    }
    if([text isEqualToString:@"请输入密码"] || [text isEqualToString:@"再次输入密码"]){
        self.secureTextEntry = YES;
    }
    if([text isEqualToString:@"请输入联系方式"]){
        self.keyboardType = UIKeyboardTypeNumberPad;
    }
    return self;
}
@end
